﻿using System.Collections.Generic;
using System.Linq;

namespace Web7.Mvc.ViewModels
{
    public class Web7ViewModelItems<T> : Web7ViewModel
    {

        #region Constructors

        public Web7ViewModelItems()
            : base()
        {
            Items = Enumerable.Empty<T>();
        }

        public Web7ViewModelItems(IEnumerable<T> items)
            : this()
        {
            Items = items;
        }

        public Web7ViewModelItems(IEnumerable<T> items, Web7ViewModel viewModel)
            : this(items)
        {
            SyncViewModel(viewModel);
        }

        #endregion

        public IEnumerable<T> Items { get; private set; }
    }
}
